package com.jiepos.mpos.biz.operationlog.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.jiepos.mpos.biz.operationlog.service.SysLogService;
import com.jiepos.mpos.common.entity.App_Modify_HistoryEntity;
import com.jiepos.mpos.core.controller.BaseController;
import com.jiepos.mpos.core.entity.Pagination;
/**
 * 
 * 系统操作日志管理
 * @ProjectName:  [mpos] 
 * @Package com.jiepos.mpos.biz.operationlog.controller 
 * @author 张磊
 * @version 1.0
 * @since 2017年9月22日 下午5:20:58
 * @history（历次修订内容、修订人、修订时间等）
 * @UpdateRemark [说明本次修改内容]
 * @Copyright (c) 2017 江苏杰博实信息技术有限公司
 */
@Controller
@RequestMapping("syslog")
public class SysLogController extends BaseController {

	@Autowired
	private SysLogService sysLogService;
	
	/**
	 * 进入系统操作日志页面
	 * @param pagination
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping("/getSysLogList.do")
	public ModelAndView getSysLogList(Pagination pagination, HttpServletRequest request,HttpServletResponse response){
		
		ModelAndView model = new ModelAndView("/module/operationlog/systemlog/systemlog_list");
		
		return super.getDetail(request, response, model);
	}
	
	/**
	 * 获取系统操作日志Json
	 * @param request
	 * @param response
	 * @param pagination
	 * @param app_Modify_HistoryEntity
	 * @return
	 */
	@RequestMapping("/getSystemLogListJson.do")
	@ResponseBody
	public Map getSystemLogListJson(HttpServletRequest request,HttpServletResponse response,Pagination pagination,App_Modify_HistoryEntity app_Modify_HistoryEntity ){
		
		return sysLogService.getSystemLogList(pagination,request,app_Modify_HistoryEntity);
	}
	
}
